home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0103 / vb.zip / KANNULAR.FRM < prev    next >
Text File  |  1996-01-17  |  17KB  |  525 lines

  1. VERSION 2.00
  2. Begin Form AnnularDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Knob Annular Properties Demo"
  6.    ClientHeight    =   3330
  7.    ClientLeft      =   1890
  8.    ClientTop       =   2250
  9.    ClientWidth     =   7890
  10.    Height          =   3735
  11.    Left            =   1830
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   222
  17.    ScaleMode       =   3  'Pixel
  18.    ScaleWidth      =   526
  19.    Top             =   1905
  20.    Width           =   8010
  21.    Begin Frame Frame4 
  22.       BackColor       =   &H00C0C0C0&
  23.       Caption         =   "Annular Radii"
  24.       FontBold        =   -1  'True
  25.       FontItalic      =   0   'False
  26.       FontName        =   "Arial"
  27.       FontSize        =   8.25
  28.       FontStrikethru  =   0   'False
  29.       FontUnderline   =   0   'False
  30.       Height          =   855
  31.       Left            =   3360
  32.       TabIndex        =   25
  33.       Top             =   2340
  34.       Width           =   4425
  35.       Begin HScrollBar HScroll1 
  36.          Height          =   240
  37.          Index           =   2
  38.          Left            =   1965
  39.          Max             =   100
  40.          TabIndex        =   4
  41.          Top             =   195
  42.          Width           =   2000
  43.       End
  44.       Begin HScrollBar HScroll1 
  45.          Height          =   240
  46.          Index           =   3
  47.          Left            =   1965
  48.          Max             =   100
  49.          TabIndex        =   5
  50.          Top             =   435
  51.          Width           =   2000
  52.       End
  53.       Begin Label Label3 
  54.          AutoSize        =   -1  'True
  55.          BackColor       =   &H00C0C0C0&
  56.          Caption         =   "0"
  57.          Height          =   195
  58.          Index           =   3
  59.          Left            =   4020
  60.          TabIndex        =   8
  61.          Top             =   465
  62.          Width           =   120
  63.       End
  64.       Begin Label Label3 
  65.          AutoSize        =   -1  'True
  66.          BackColor       =   &H00C0C0C0&
  67.          Caption         =   "0"
  68.          Height          =   195
  69.          Index           =   2
  70.          Left            =   4020
  71.          TabIndex        =   9
  72.          Top             =   210
  73.          Width           =   120
  74.       End
  75.       Begin Label Label1 
  76.          AutoSize        =   -1  'True
  77.          BackStyle       =   0  'Transparent
  78.          Caption         =   "AnnularInnerRadius:"
  79.          FontBold        =   0   'False
  80.          FontItalic      =   0   'False
  81.          FontName        =   "Arial"
  82.          FontSize        =   8.25
  83.          FontStrikethru  =   0   'False
  84.          FontUnderline   =   0   'False
  85.          Height          =   210
  86.          Index           =   2
  87.          Left            =   495
  88.          TabIndex        =   10
  89.          Top             =   225
  90.          Width           =   1470
  91.       End
  92.       Begin Label Label2 
  93.          Alignment       =   2  'Center
  94.          AutoSize        =   -1  'True
  95.          BackStyle       =   0  'Transparent
  96.          Caption         =   " "
  97.          Height          =   195
  98.          Index           =   2
  99.          Left            =   2685
  100.          TabIndex        =   11
  101.          Top             =   210
  102.          Width           =   90
  103.       End
  104.       Begin Label Label1 
  105.          AutoSize        =   -1  'True
  106.          BackStyle       =   0  'Transparent
  107.          Caption         =   "AnnularOuterRadius:"
  108.          FontBold        =   0   'False
  109.          FontItalic      =   0   'False
  110.          FontName        =   "Arial"
  111.          FontSize        =   8.25
  112.          FontStrikethru  =   0   'False
  113.          FontUnderline   =   0   'False
  114.          Height          =   210
  115.          Index           =   3
  116.          Left            =   465
  117.          TabIndex        =   12
  118.          Top             =   465
  119.          Width           =   1515
  120.       End
  121.       Begin Label Label2 
  122.          Alignment       =   2  'Center
  123.          AutoSize        =   -1  'True
  124.          BackStyle       =   0  'Transparent
  125.          Caption         =   " "
  126.          Height          =   195
  127.          Index           =   3
  128.          Left            =   2685
  129.          TabIndex        =   13
  130.          Top             =   450
  131.          Width           =   90
  132.       End
  133.    End
  134.    Begin Frame Frame3 
  135.       BackColor       =   &H00C0C0C0&
  136.       Caption         =   "Annular Values"
  137.       FontBold        =   -1  'True
  138.       FontItalic      =   0   'False
  139.       FontName        =   "Arial"
  140.       FontSize        =   8.25
  141.       FontStrikethru  =   0   'False
  142.       FontUnderline   =   0   'False
  143.       Height          =   900
  144.       Left            =   3360
  145.       TabIndex        =   24
  146.       Top             =   1440
  147.       Width           =   4395
  148.       Begin HScrollBar HScroll1 
  149.          Height          =   240
  150.          Index           =   0
  151.          Left            =   1965
  152.          Max             =   100
  153.          TabIndex        =   31
  154.          Top             =   255
  155.          Width           =   2000
  156.       End
  157.       Begin HScrollBar HScroll1 
  158.          Height          =   240
  159.          Index           =   1
  160.          Left            =   1965
  161.          Max             =   100
  162.          TabIndex        =   30
  163.          Top             =   480
  164.          Width           =   2000
  165.       End
  166.       Begin Label Label3 
  167.          AutoSize        =   -1  'True
  168.          BackColor       =   &H00C0C0C0&
  169.          Caption         =   "0"
  170.          Height          =   195
  171.          Index           =   1
  172.          Left            =   4020
  173.          TabIndex        =   26
  174.          Top             =   525
  175.          Width           =   120
  176.       End
  177.       Begin Label Label3 
  178.          AutoSize        =   -1  'True
  179.          BackColor       =   &H00C0C0C0&
  180.          Caption         =   "0"
  181.          Height          =   195
  182.          Index           =   0
  183.          Left            =   4020
  184.          TabIndex        =   27
  185.          Top             =   285
  186.          Width           =   120
  187.       End
  188.       Begin Label Label2 
  189.          Alignment       =   2  'Center
  190.          AutoSize        =   -1  'True
  191.          BackStyle       =   0  'Transparent
  192.          Caption         =   " "
  193.          Height          =   195
  194.          Index           =   0
  195.          Left            =   2190
  196.          TabIndex        =   28
  197.          Top             =   285
  198.          Width           =   90
  199.       End
  200.       Begin Label Label1 
  201.          AutoSize        =   -1  'True
  202.          BackStyle       =   0  'Transparent
  203.          Caption         =   "AnnularStartValue:"
  204.          FontBold        =   0   'False
  205.          FontItalic      =   0   'False
  206.          FontName        =   "Arial"
  207.          FontSize        =   8.25
  208.          FontStrikethru  =   0   'False
  209.          FontUnderline   =   0   'False
  210.          Height          =   210
  211.          Index           =   0
  212.          Left            =   585
  213.          TabIndex        =   34
  214.          Top             =   285
  215.          Width           =   1380
  216.       End
  217.       Begin Label Label1 
  218.          AutoSize        =   -1  'True
  219.          BackStyle       =   0  'Transparent
  220.          Caption         =   "AnnularStopValue:"
  221.          FontBold        =   0   'False
  222.          FontItalic      =   0   'False
  223.          FontName        =   "Arial"
  224.          FontSize        =   8.25
  225.          FontStrikethru  =   0   'False
  226.          FontUnderline   =   0   'False
  227.          Height          =   210
  228.          Index           =   1
  229.          Left            =   585
  230.          TabIndex        =   33
  231.          Top             =   510
  232.          Width           =   1365
  233.       End
  234.       Begin Label Label2 
  235.          Alignment       =   2  'Center
  236.          AutoSize        =   -1  'True
  237.          BackStyle       =   0  'Transparent
  238.          Caption         =   " "
  239.          Height          =   195
  240.          Index           =   1
  241.          Left            =   2190
  242.          TabIndex        =   32
  243.          Top             =   510
  244.          Width           =   90
  245.       End
  246.    End
  247.    Begin KNOB Knob1 
  248.       Angle           =   0
  249.       AutoRedraw      =   -1  'True
  250.       AVersion        =   2.5
  251.       BackgroundColor =   &H00C0C0C0&
  252.       BevelInner      =   0  ' 0 - None
  253.       BevelOuter      =   1  ' 1 - Raised
  254.       BevelWidth      =   2
  255.       BorderType      =   1  ' 1 - Bevel
  256.       BorderWidth     =   2
  257.       Digital         =   0   'False
  258.       DigitalColor    =   &H00000000&
  259.       DigitalDecimals =   0
  260.       DigitalFontID   =   0
  261.       DigitalX        =   0
  262.       DigitalY        =   0
  263.       FontID          =   0
  264.       FrameColor      =   &H00000000&
  265.       FrameScaleX     =   0
  266.       FrameScaleY     =   0
  267.       FrameStyle      =   0  ' 0 - None
  268.       Height          =   3045
  269.       KnobColor       =   &H00808080&
  270.       KnobMultiTurn   =   0   'False
  271.       KnobMultiTurnValue=   0
  272.       KnobRadius      =   0.6
  273.       KnobSnap        =   0   'False
  274.       KnobSnapIncrement=   1
  275.       KnobStyle       =   0  ' 0 - Cicular
  276.       KnobUserDefined =   ""
  277.       KnobValue       =   0
  278.       Left            =   60
  279.       MarkUserDefined =   ""
  280.       MouseControl    =   -1  'True
  281.       OutlineAlign    =   0  ' 0 - Left 
  282.       OutlineColor    =   &H00000000&
  283.       OutlineTitle    =   ""
  284.       OutlineWidth    =   0
  285.       Radius          =   0
  286.       TabIndex        =   23
  287.       Top             =   135
  288.       Value           =   0
  289.       Width           =   3135
  290.       XScale          =   0
  291.       YScale          =   0
  292.       ZLoad           =   KANNULAR.FRX:0000
  293.    End
  294.    Begin Frame Frame2 
  295.       BackColor       =   &H00C0C0C0&
  296.       Caption         =   "Annular Color"
  297.       FontBold        =   -1  'True
  298.       FontItalic      =   0   'False
  299.       FontName        =   "Arial"
  300.       FontSize        =   8.25
  301.       FontStrikethru  =   0   'False
  302.       FontUnderline   =   0   'False
  303.       Height          =   1095
  304.       Left            =   5700
  305.       TabIndex        =   6
  306.       Top             =   75
  307.       Width           =   1635
  308.       Begin Label Colors 
  309.          BackColor       =   &H00000000&
  310.          Height          =   225
  311.          Index           =   0
  312.          Left            =   240
  313.          TabIndex        =   7
  314.          Top             =   390
  315.          Width           =   225
  316.       End
  317.       Begin Label Colors 
  318.          BackColor       =   &H00808080&
  319.          Height          =   225
  320.          Index           =   1
  321.          Left            =   240
  322.          TabIndex        =   14
  323.          Top             =   630
  324.          Width           =   225
  325.       End
  326.       Begin Label Colors 
  327.          BackColor       =   &H00FFFFFF&
  328.          Height          =   225
  329.          Index           =   2
  330.          Left            =   480
  331.          TabIndex        =   15
  332.          Top             =   390
  333.          Width           =   225
  334.       End
  335.       Begin Label Colors 
  336.          BackColor       =   &H000000FF&
  337.          Height          =   225
  338.          Index           =   3
  339.          Left            =   480
  340.          TabIndex        =   16
  341.          Top             =   630
  342.          Width           =   225
  343.       End
  344.       Begin Label Colors 
  345.          BackColor       =   &H0000FF00&
  346.          Height          =   225
  347.          Index           =   4
  348.          Left            =   720
  349.          TabIndex        =   17
  350.          Top             =   390
  351.          Width           =   225
  352.       End
  353.       Begin Label Colors 
  354.          BackColor       =   &H0000FFFF&
  355.          Height          =   225
  356.          Index           =   5
  357.          Left            =   720
  358.          TabIndex        =   18
  359.          Top             =   630
  360.          Width           =   225
  361.       End
  362.       Begin Label Colors 
  363.          BackColor       =   &H00FF0000&
  364.          Height          =   225
  365.          Index           =   6
  366.          Left            =   960
  367.          TabIndex        =   19
  368.          Top             =   390
  369.          Width           =   225
  370.       End
  371.       Begin Label Colors 
  372.          BackColor       =   &H00FF00FF&
  373.          Height          =   225
  374.          Index           =   7
  375.          Left            =   960
  376.          TabIndex        =   20
  377.          Top             =   630
  378.          Width           =   225
  379.       End
  380.       Begin Label Colors 
  381.          BackColor       =   &H000080FF&
  382.          Height          =   225
  383.          Index           =   8
  384.          Left            =   1200
  385.          TabIndex        =   21
  386.          Top             =   390
  387.          Width           =   225
  388.       End
  389.       Begin Label Colors 
  390.          BackColor       =   &H00004040&
  391.          Height          =   225
  392.          Index           =   9
  393.          Left            =   1200
  394.          TabIndex        =   22
  395.          Top             =   630
  396.          Width           =   225
  397.       End
  398.    End
  399.    Begin Frame Frame1 
  400.       BackColor       =   &H00C0C0C0&
  401.       Caption         =   "Annular ID"
  402.       FontBold        =   -1  'True
  403.       FontItalic      =   0   'False
  404.       FontName        =   "Arial"
  405.       FontSize        =   8.25
  406.       FontStrikethru  =   0   'False
  407.       FontUnderline   =   0   'False
  408.       Height          =   1095
  409.       Left            =   3720
  410.       TabIndex        =   0
  411.       Top             =   75
  412.       Width           =   1845
  413.       Begin OptionButton Option1 
  414.          BackColor       =   &H00C0C0C0&
  415.          Caption         =   "3"
  416.          Height          =   255
  417.          Index           =   3
  418.          Left            =   885
  419.          TabIndex        =   29
  420.          TabStop         =   0   'False
  421.          Top             =   525
  422.          Width           =   615
  423.       End
  424.       Begin OptionButton Option1 
  425.          BackColor       =   &H00C0C0C0&
  426.          Caption         =   "2"
  427.          Height          =   255
  428.          Index           =   2
  429.          Left            =   885
  430.          TabIndex        =   3
  431.          TabStop         =   0   'False
  432.          Top             =   315
  433.          Width           =   615
  434.       End
  435.       Begin OptionButton Option1 
  436.          BackColor       =   &H00C0C0C0&
  437.          Caption         =   "1"
  438.          Height          =   255
  439.          Index           =   1
  440.          Left            =   240
  441.          TabIndex        =   2
  442.          TabStop         =   0   'False
  443.          Top             =   525
  444.          Width           =   615
  445.       End
  446.       Begin OptionButton Option1 
  447.          BackColor       =   &H00C0C0C0&
  448.          Caption         =   "0"
  449.          Height          =   255
  450.          Index           =   0
  451.          Left            =   240
  452.          TabIndex        =   1
  453.          Top             =   315
  454.          Value           =   -1  'True
  455.          Width           =   615
  456.       End
  457.    End
  458. End
  459.  
  460. Sub Colors_Click (index As Integer)
  461.  
  462.     knob1.AnnularColor = colors(index).BackColor
  463.  
  464. End Sub
  465.  
  466. Sub Form_Load ()
  467.  
  468.     hscroll1(0) = knob1.AnnularStartValue * 10
  469.     hscroll1(1) = knob1.AnnularStopValue * 10
  470.     hscroll1(2) = knob1.AnnularInnerRadius * 100
  471.     hscroll1(3) = knob1.AnnularOuterRadius * 100
  472.     knob1.AnnularID = 2
  473.     option1(2) = True
  474.  
  475. End Sub
  476.  
  477. Sub HScroll1_Change (index As Integer)
  478.  
  479.     Select Case index
  480.         Case 0
  481.             knob1.AnnularStartValue = hscroll1(0) / 10
  482.             label3(index) = knob1.AnnularStartValue
  483.         Case 1
  484.             knob1.AnnularStopValue = hscroll1(1) / 10
  485.             label3(index) = knob1.AnnularStopValue
  486.         Case 2
  487.             knob1.AnnularInnerRadius = hscroll1(2) / 100
  488.             label3(index) = knob1.AnnularInnerRadius
  489.         Case 3
  490.             knob1.AnnularOuterRadius = hscroll1(3) / 100
  491.             label3(index) = knob1.AnnularOuterRadius
  492.     End Select
  493.  
  494. End Sub
  495.  
  496. Sub HScroll1_Scroll (index As Integer)
  497.  
  498.     Select Case index
  499.         Case 0
  500.             knob1.AnnularStartValue = hscroll1(0) / 10
  501.             label3(index) = knob1.AnnularStartValue
  502.         Case 1
  503.             knob1.AnnularStopValue = hscroll1(1) / 10
  504.             label3(index) = knob1.AnnularStopValue
  505.         Case 2
  506.             knob1.AnnularInnerRadius = hscroll1(2) / 100
  507.             label3(index) = knob1.AnnularInnerRadius
  508.         Case 3
  509.             knob1.AnnularOuterRadius = hscroll1(3) / 100
  510.             label3(index) = knob1.AnnularOuterRadius
  511.     End Select
  512.  
  513. End Sub
  514.  
  515. Sub Option1_Click (index As Integer)
  516.  
  517.     knob1.AnnularID = index
  518.     hscroll1(0) = knob1.AnnularStartValue * 10
  519.     hscroll1(1) = knob1.AnnularStopValue * 10
  520.     hscroll1(2) = knob1.AnnularInnerRadius * 100
  521.     hscroll1(3) = knob1.AnnularOuterRadius * 100
  522.  
  523. End Sub
  524.  
  525.